<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="tag" tagdir="/WEB-INF/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<!DOCTYPE html>
<html>
<tag:head title="检索结果" ctx="${ctx}">
	<link href="${ctx}/assets/css/staff/staff_book_searchReslut/staff_book_searchResult.css" rel="stylesheet">	<!-- 该页面特定的样式 -->
</tag:head>

<tag:body>
	<!-- 左 上 导航 -->
	<tag:nav ctx="${ctx}"></tag:nav>

	<!-- page content -->
	<div class="right_col" role="main">
		<div class="">
			<div class="clearfix"></div>

			<div class="row">
				<div class="col-md-12 col-sm-12 col-xs-12">
					<div class="x_panel">
						<div class="x_title">
							<h2>检索结果</h2>
							<div class="clearfix"></div>
						</div>
						<div class="x_content">
								<c:if test="${fn:length(requestScope.books) == 0}">
									<div class="alert alert-warning">
										<h4><i class="fa fa-warning"></i>搜索结果为空</h4>
									</div>
								</c:if>
								<c:forEach var="book" items="${requestScope.books}">
									<div class="col-md-55">
										<div class="thumbnail">
											<div class="image view view-first">
												<c:choose>
													<c:when test="${book.state == 0}">
														<span class="label label-success">在库可借</span>
													</c:when>
													<c:when test="${book.state == 1}">
														<span class="label label-warning">已借出</span>
													</c:when>
													<c:when test="${book.state == 2}">
														<span class="label label-danger">已丢失</span>
													</c:when>
												</c:choose>

												<img style="width: 100%; display: block;" src="${ctx}/${book.bookImage}" alt="image" />
												<div class="mask">
													<h3 class="green">&nbsp;</h3>
													<div class="tools tools-bottom">
														<div class="tags">
															<button type="button" class="btn btn-info btn-xs" onclick="bookInfo('${book.bookId}')">查看</button>
														</div>
													</div>
												</div>
											</div>
											<div class="caption">
												<p>书名:《<strong>${book.name}</strong>》</p>
												<p>作者:<strong>${book.author}</strong></p>
												<p>出版社:<strong>${book.publish}</strong></p>
												<p>评分:
													<c:if test="${book.grade == null}">暂无评分</c:if>
													<c:forEach begin="1" end="${book.grade}">
														<i class="fa fa-star" style="color:#FFD119"></i>
													</c:forEach>
														${book.grade}分(${fn:length(book.evaluates)}人评价过)
												</p>
											</div>
										</div>
									</div>
								</c:forEach>
							<div class="dataTables_paginate paging_simple_numbers" id="datatable-checkbox_paginate">
								<ul class="pagination">
									<li class="paginate_button previous disabled" id="datatable-checkbox_previous">
										<a href="javascript:void(0)" aria-controls="datatable-checkbox" data-dt-idx="0" tabindex="0">上一页</a>
									</li>
									<li class="paginate_button next disabled" id="datatable-checkbox_next">
										<a href="javascript:void(0)" aria-controls="datatable-checkbox" data-dt-idx="2" tabindex="0">下一页</a>
									</li>
								</ul>
							</div>
						</div>
					</div>
				</div>

			</div>


		</div>
	</div>
	<!-- /page content -->

	<!-- footer content -->
	<tag:footer></tag:footer>
</tag:body>
<!-- javascript -->
<tag:javascript ctx="${ctx}">
	<!-- this page -->
	<script src="${ctx}/assets/js/staff/staff_book_searchResult.js"></script>
	<script>
		<c:if test="${requestScope.error != null}">
			createPNotify("提示信息","error","${requestScope.error}");
		</c:if>

		createPaging($('#datatable-checkbox_paginate'),${requestScope.page.currentPageNum},${requestScope.page.totalPageNum},"searchBooks(this,'${requestScope.author}','${requestScope.publish}','${requestScope.bookClass}','${requestScope.type}','${requestScope.bookName}'" + ")",10);
		adjustPagination($("#datatable-checkbox_paginate").children("ul"),${requestScope.page.currentPageNum},${requestScope.page.totalPageNum});
	</script>
</tag:javascript>
</html>

<!-- start:借阅图书 -->
<div class="modal fade bs-example-modal-bb" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog modal-sm">
		<div class="modal-content">

			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
						aria-hidden="true">×</span>
				</button>
				<h4 class="modal-title">借阅图书</h4>
			</div>
			<div class="modal-body">
				<h4>确定借阅选定的？</h4>
			</div>
			<div class="form-group">
				<label class="control-label col-md-3 col-sm-3 col-xs-12"></label>
				<div class="col-md-6 col-sm-6 col-xs-12">
					<h4 class="info">成功或失败提示</h4>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				<button type="button" class="btn btn-primary">确定</button>
			</div>

		</div>
	</div>
</div>
<!-- end:借阅图书 -->

<!-- start:bigImage -->
<div class="modal fade bigImage" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog modal-sm">
		<div class="modal-content">
			<img src="" width="300px" height="300px">
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>

		</div>
	</div>
</div>
<!-- end:bigImage -->